package com.examsystem.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.examsystem.common.ResultJson;
import com.examsystem.entity.exame_user;
import com.examsystem.service.OnlineExameService;

/**
 * 在线考试控制器(针对学生
 * @author An-Il
 *
 */
@RestController
@RequestMapping("/zxks")
public class OnlineExameController {
	
	@Autowired
	private OnlineExameService onlineExameService;
	
	/**
	 * 考生登录后能查询到本人相关的考试信息。
	 * @return
	 */
	@PostMapping("/selectks")
	public ResultJson selectks(exame_user user,
			@RequestParam(defaultValue="1")Integer page,
			@RequestParam(defaultValue="10")Integer pageSize) {
		ResultJson result=null;
		//判断用户(交给拦截器)
		//返回
		result = onlineExameService.selectks( user, page, pageSize);
		return result;
	}
	
	/**
	 * 考试选择考试后可以进行在线考试。
	 * @return
	 */
	@PostMapping("/onlineks")
	public ResultJson onlineks() {
		
		return null;
	}
}
